import { configureStore, ThunkAction, Action } from '@reduxjs/toolkit'

import login from 'views/login/loginSlice'
import home from 'views/home/homeSlice'

export const store = configureStore({
  reducer: {
    home,
    login,
  },
})

export type AppDispatch = typeof store.dispatch
export type RootState = ReturnType<typeof store.getState>
export type AppThunk<ReturnType = void> = ThunkAction<ReturnType, RootState, unknown, Action<string>>
